home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Games Collection 1
/
software vault.zip
/
software vault
/
CDR02
/
DCGAMES1.ZIP
/
NEWGAME.ZIP
/
BARTENDE.SCR
next >
Wrap
Text File
|
1993-04-01
|
4KB
|
181 lines
!
! Default bartender script..
!
! (c) DC Software, 1992
!
! Pending Enhancements
!
! - This script has no voices. For an example of voices, look at
! MERCHANT.SCR and HEALER.SCR
!
!------------------------------------------------------------------------!
:@TALK ! Talk to the character !
!------------------------------------------------------------------------!
! First, say hello.. !
if NPC.V0 > 0 then
writeln( "Hello ", player.name, ". What brings you back?" );
else
writeln( "Welcome to ", npc.name, ". How may I help you?" );
endif;
! NowF, set some variables..
NPC.V0 = 1; ! From know on, remember we've been here
L1 = 0; ! No business transactions have taken place
L4 = npc.value / 5 + 1; ! Standard Tip Amount !
:LOOP
L3 = select$( "Buy Drink", npc.value,
"Give Tip", L4,
"Talk", -1 );
ON L3 GOTO DRINK,TIP,XTALK;
:CSTOP
if L1 = 0 THEN
writeln( "Hasta la vista, baby." );
else
writeln( "It's been a pleasure doing business with you!" );
endif;
STOP;
!
! Drink
!
:DRINK
if group.gold < npc.value GOTO BROKE;
dec( group.gold, npc.value );
ON L1 GOTO DRINK1, DRINK2, DRINK3, DRINK4;
writeln( "No more beer for you.." );
GOTO LOOP;
:DRINK1
writeln( ">Ahhh.. That really hit the spot.." );
inc(L1);
goto LOOP;
:DRINK2
writeln( ">Excellent brew, yes sir.." );
inc(L1);
goto LOOP;
:DRINK3
writeln( ">Glugh, glugh, glugh, hic!" );
inc(L1);
goto LOOP;
:DRINK4
writeln( ">Glugh, glugh, burp! Sorry.." );
inc(L1);
if random(2) then ! 50 % chance of getting sick..
player.poisoned = 1;
writeln( "(You feel sick..)" );
endif;
goto LOOP;
!
! Give TIP
!
:TIP
if group.gold < L4 GOTO BROKE;
dec( group.gold, L4 );
ON L1 GOTO TIP1, TIP2, TIP3, TIP4, TIP5;
:TIP1
writeln( ">Heard any good ones lately?" );
writeln( "(the bartender ignores you..)" );
inc( group.gold, L4 );
goto LOOP;
:TIP2
writeln( ">It's pretty slow around here.." );
writeln( "It's the weather.. You'll get used to it.." );
goto LOOP;
:TIP3
loadhint; ! Loads a random hint into a string variable !
writeln( S0 );
goto LOOP;
:TIP4
writeln( ">Heard any good.. Hic!.." );
writeln( "You're drunk.. You should leave now." );
goto LOOP;
:TIP5
writeln( ">Hic! 'scuse me.. Hic! Burp!" );
writeln( "No drunks allowed on the premises.." );
STOP;
:BROKE
writeln( "You don't have enough money!");
goto LOOP;
!
! Conversation
!
:XTALK
on L1 GOTO TALK1, TALK2, CHAT;
writeln( ">Hic! Hic! Burp! 'Scuse me.. Hic!" );
writeln( "You'd better watch your drinking buddy.." );
goto LOOP;
:TALK1
writeln( "Does this look like a social club?" );
goto LOOP;
:TALK2
writeln( "I'm busy. Ask me again later.." );
goto LOOP;
:CHAT
writeln( "What would you like to talk about?" );
:CHAT1
L3 = getstr("Name","Beer","Tip","Job","Bye");
if L3 = -1 then
writeln( "Ok." );
goto LOOP; ! Pressed ESCape !
endif;
! First, see if the keyword typed is in the character's text block !
if dotext( S0 ) goto CHAT1;
! It didn't, so try the predefined ones..
on L3 goto CNAME, CBEER, CTIP, CJOB, CSTOP;
! Nope, try a 'DEFAULT' line
if not dotext( "DEFAULT" ) then
! didn't have 'default' in the text block, so give standard default !
writeln( "I don't know anything about that!" );
endif;
goto CHAT1;
:CNAME
writeln( "My name is ", NPC.name, "." );
GOTO CHAT1;
:CBEER
writeln( "A beer sells for ", $npc.value, " the pretzels are free." );
GOTO CHAT1;
:CTIP
writeln( "Most people give ", $L4 );
GOTO CHAT1;
:CJOB
writeln( "I sell {beer}!" );
GOTO CHAT1;
! Feel free to expand on this list.. !